import request from '../../utils/Request'

export const saveApplication = data => {
    return request({
        method: 'post',
        url: '/api/daily/application/save',
        data: data
    })
}

export const deleteApplication = bid => {
    return request({
        method: 'get',
        url: '/api/daily/application/delete/' + bid,
        params: {}
    })
}

export const selectApplication = bid => {
    return request({
        method: 'get',
        url: '/api/daily/application/select' + bid,
        params: {}
    })
}

export const listApplication = (data, current, size) => {
    data.current = current
    data.size = size
    return request({
        method: 'get',
        url: '/api/daily/application/list',
        params: {data}
    })
}

export const listApplicationByCurrentUser = (data, current, size) => {
    data.current = current
    data.size = size
    return request({
        method: 'get',
        url: '/api/daily/application/list/manage',
        params: data
    })
}

export const updateApplicationAcceptStatus =bid =>{
    return request({
        method: 'get',
        url: '/api/daily/application/update/status/accept/' + bid,
        params: {}
    })
}

export const updateApplicationRefuseStatus =bid =>{
    return request({
        method: 'get',
        url: '/api/daily/application/update/status/refuse/' + bid,
        params: {}
    })
}

export const listApplicationByUser = bid => {
    return request({
        method: 'get',
        url: '/api/daily/application/list/user',
        params: {}
    })
}
